package com.asset.pojo;

import java.util.Date;

public class Asset {
    public enum Status{
	//资产状态   使用中、已分配、维修中、备用、报废、
    	Spare("备用",(short)1),Assigned("已分配",(short)2),Using("使用中",(short)3),Maintenance("维修中",(short)4),Scrap("报废",(short)5);
        public short value;
		public String name;
		Status(String name,short value){
			this.value = value;
			this.name = name;
		}
		public static String getName(short value) {
	        for (Status c : Status.values()) {  
	            if (c.getValue() == value) {  
	                return c.name;  
	            }  
	        }  
	        return null;  
	    } 
		public static short getValue(String name) {
            for (Status c : Status.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        } 
        public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
		
    }
   
	public enum EquipGenre{
		//	设备类别   电子设备 办公设备
		Eleceron("电子设备",(short)0),Official("办公设备",(short)1);
		public short value;
		public String name;
	    EquipGenre(String name,short value){
			this.value = value;
			this.name = name;
		}
	    
	    public static String getName(short value) {
            for (EquipGenre c : EquipGenre.values()) {  
                if (c.getValue() == value) {  
                    return c.name;  
                }  
            }  
            return null;  
        } 
		public static short getValue(String name) {
            for (EquipGenre c : EquipGenre.values()) {  
                if (c.getName().equals(name)) {
                    return c.value;  
                }  
            }
            return 404;  
        } 
		public short getValue(){
            return value;
        }
        public void setValue(short value){
            this.value = value;
        }
        public String getName(){
            return name;
        }
        public void setName(String name){
            this.name = name;
        }
	}

	public enum IfPd{
		//	是否盘点
			Check("已盘点",(short)0),Nocheck("未盘点",(short)1);
			public short value;
			public String name;
			IfPd(String name,short value){
				this.value = value;
				this.name = name;
			}
		    
		    public static String getName(short value) {
	            for (IfPd c : IfPd.values()) {  
	                if (c.getValue() == value) {  
	                    return c.name;  
	                }  
	            }  
	            return null;  
	        } 
			public static short getValue(String name) {
	            for (IfPd c : IfPd.values()) {  
	                if (c.getName().equals(name)) {
	                    return c.value;  
	                }  
	            }
	            return 404;  
	        } 
			public short getValue(){
	            return value;
	        }
	        public void setValue(short value){
	            this.value = value;
	        }
	        public String getName(){
	            return name;
	        }
	        public void setName(String name){
	            this.name = name;
	        }
	}
	
	private long id;
	private String equipIdentifier;//资产编号
	private String itCode;  //it编号
	private Short equipGenre;//设备类别
	private String equipName;//设备名称
	private String equipModel;//设备型号
	private String equipBrand;//设备品牌
	private String usePerson;//使用人员
	private String useDepart;//使用部门
	private String equipLocation;//设备存放地点
	private String equipAttach;//设备归属地点
	private String condition;//使用状况
	private String assetAllocation;//资产配置
	private Date buyTime;//购买时间
	private Date assignTime;//分配时间
	private Date receiveTime;//领用时间
	private Date modifyTime;//最近修改时间
	private Short ifPd;//1:已经判点，0或2没有被盘点
	private String remarks;
	private Short status; //资产状态
	private String lastUser;//最后修改人
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getEquipIdentifier() {
		return equipIdentifier;
	}
	public void setEquipIdentifier(String equipIdentifier) {
		this.equipIdentifier = equipIdentifier;
	}
	public String getItCode() {
		return itCode;
	}
	public void setItCode(String itCode) {
		this.itCode = itCode;
	}
	public Short getEquipGenre() {
		return equipGenre;
	}
	public void setEquipGenre(Short equipGenre) {
		this.equipGenre = equipGenre;
	}
	public String getEquipName() {
		return equipName;
	}
	public void setEquipName(String equipName) {
		this.equipName = equipName;
	}
	public String getEquipModel() {
		return equipModel;
	}
	public void setEquipModel(String equipModel) {
		this.equipModel = equipModel;
	}
	public String getEquipBrand() {
		return equipBrand;
	}
	public void setEquipBrand(String equipBrand) {
		this.equipBrand = equipBrand;
	}
	public String getUsePerson() {
		return usePerson;
	}
	public void setUsePerson(String usePerson) {
		this.usePerson = usePerson;
	}
	public String getUseDepart() {
		return useDepart;
	}
	public void setUseDepart(String useDepart) {
		this.useDepart = useDepart;
	}
	public String getEquipLocation() {
		return equipLocation;
	}
	public void setEquipLocation(String equipLocation) {
		this.equipLocation = equipLocation;
	}
	public String getEquipAttach() {
		return equipAttach;
	}
	public void setEquipAttach(String equipAttach) {
		this.equipAttach = equipAttach;
	}
	public String getCondition() {
		return condition;
	}
	public void setCondition(String condition) {
		this.condition = condition;
	}
	public String getAssetAllocation() {
		return assetAllocation;
	}
	public void setAssetAllocation(String assetAllocation) {
		this.assetAllocation = assetAllocation;
	}
	public Date getBuyTime() {
		return buyTime;
	}
	public void setBuyTime(Date buyTime) {
		this.buyTime = buyTime;
	}
	public Date getAssignTime() {
		return assignTime;
	}
	public void setAssignTime(Date assignTime) {
		this.assignTime = assignTime;
	}
	public Date getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}
	public Date getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	public Short getIfPd() {
		return ifPd;
	}
	public void setIfPd(Short ifPd) {
		this.ifPd = ifPd;
	}
	public String getRemarks() {
		return remarks;
	}
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}
	public Short getStatus() {
		return status;
	}
	public void setStatus(Short status) {
		this.status = status;
	}
	public String getLastUser() {
		return lastUser;
	}
	public void setLastUser(String lastUser) {
		this.lastUser = lastUser;
	}
	@Override
	public String toString() {
		return "Asset [id=" + id + ", equipIdentifier=" + equipIdentifier + ", itCode=" + itCode + ", equipGenre="
				+ equipGenre + ", equipName=" + equipName + ", equipModel=" + equipModel + ", equipBrand=" + equipBrand
				+ ", usePerson=" + usePerson + ", useDepart=" + useDepart + ", equipLocation=" + equipLocation
				+ ", equipAttach=" + equipAttach + ", condition=" + condition + ", assetAllocation=" + assetAllocation
				+ ", buyTime=" + buyTime + ", assignTime=" + assignTime + ", receiveTime=" + receiveTime
				+ ", modifyTime=" + modifyTime + ", ifPd=" + ifPd + ", remarks=" + remarks + ", status=" + status
				+ ", lastUser=" + lastUser + "]";
	}
	
}
